#pragma once
#include "Video.h"
#include "DepthStencil.h"
namespace I32 = Reign::Core::MathI32;
namespace F32 = Reign::Core::MathF32;

namespace Reign
{namespace Video
{namespace D3D10
{
	public ref class Texture3D : Disposable, Texture3DI
	{
		#pragma region Properties
		protected: Video^ video;
		protected: ID3D10Texture3D* texture;
		protected: SurfaceFormats surfaceFormat;

		private: ID3D10ShaderResourceView* shaderResource;
		public: property ID3D10ShaderResourceView* ShaderResource {ID3D10ShaderResourceView* get();}

		private: I32::Vector3 size;
		public: property I32::Vector3 Size {virtual I32::Vector3 get();}

		private: F32::Vector3 sizeF;
		public: property F32::Vector3 SizeF {virtual F32::Vector3 get();}

		private: F32::Vector3 texelOffset;
		public: property F32::Vector3 TexelOffset {virtual F32::Vector3 get();}
		#pragma endregion
	
		#pragma region Constructors
		public: Texture3D(DisposableI^ parent, string^ fileName);
		public: Texture3D(DisposableI^ parent, int width, int height, int depth, bool generateMipmaps, MultiSampleTypes multiSampleType, SurfaceFormats surfaceFormat, BufferUsages usage);
		protected: virtual void init(DisposableI^ parent, string^ fileName, int width, int height, int depth, bool generateMipmaps, MultiSampleTypes multiSampleType, SurfaceFormats surfaceFormat, BufferUsages usage, bool isRenderTarget);
		public: ~Texture3D();
		private: void null();
		#pragma endregion

		#pragma region Methods
		public: virtual void Update(array<byte>^ data);
		public: virtual void UpdateDynamic(array<byte>^ data);
		public: virtual void Copy(Texture3DI^ texture);
		public: virtual array<System::Byte>^ Copy();
		#pragma endregion
	};
}
}
}